<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Index</title>
    <script src="../static/js/jquery-1.11.1.min.js"></script>
</head>
<body>
    <h1>COVID-2019 追踪 !</h1>
    <h3>实时报道</h3>
<button>click ME .</button>
<script>  <!--局部刷新 ajax：Asyn Javascript Aand Xml -->
    $("button").click(function (){
        $.ajax({
            url:"/ajax",
            type:"post",
            data:{"name":"王冰冰", "score":99},
            success:function (d){
                $("h1").html("我的心是冰冰的..."+d)
            },error:function(){
                alert("ajax Error.")
            }
        })
    })
</script>

</body>
</html>

















